package com.sky.service;

import com.sky.dto.EmployeeDTO;
import com.sky.dto.EmployeeLoginDTO;
import com.sky.dto.PasswordEditDTO;
import com.sky.entity.Employee;
import com.sky.result.PageResult;
import com.sky.result.Result;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

public interface EmployeeService {

    /**
     * 员工登录
     * @param employeeLoginDTO
     * @return
     */
    Employee login(EmployeeLoginDTO employeeLoginDTO);

    /**
     * 新增员工
     * @param employeeDTO
     * @param request
     * @return
     */
    Result<String> addEmployee(EmployeeDTO employeeDTO, HttpServletRequest request);

    /**
     * 分页查询
     * @param name
     * @param page
     * @param pageSize
     * @return
     */
    Result<PageResult> queryEmployeeByPage(String name, Integer page, Integer pageSize);

    /**
     * 修改员工状态
     * @param status
     * @param id
     * @return
     */
    Result<String> updateByStatus(Integer status, Integer id);

    Result<Employee> queryById(Integer id);

    Result updateByEmployee(EmployeeDTO employeeDTO);

    Result updateByPassword(PasswordEditDTO passwordEditDTO);
}
